package com.twu.biblioteca;

public class Movie {

    private final int number;
    private final String title;
    private final int year;
    private final String director;
    private final Rating rating;

    public Movie(int number, String title, int year, String director, Rating rating) {
        this.number = number;
        this.title = title;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public int number(){
        return number;
    }

    public String title() {
        return title;
    }

    @Override
    public boolean equals(Object obj) {
        Movie other = (Movie) obj;
        if (other == null || !this.getClass().equals(other.getClass())) return false;
        if (this.number == other.number && this.title.equals(other.title) && this.year == year &&
                this.director.equals(other.director) && this.rating.equals(other.rating)) {
            return true;
        }
        return false;

    }


}
